package fileApi

import (
	"common/response"
	"net/http"

	"file/internal/logic/fileApi"
	"file/internal/svc"
)

func UploadFileHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		l := fileApi.NewUploadFileLogic(r.Context(), svcCtx, r)
		resp, err := l.UploadFile()
		//if err != nil {
		//	httpx.ErrorCtx(r.Context(), w, err)
		//} else {
		//	httpx.OkJsonCtx(r.Context(), w, resp)
		//} -->
		response.Response(w, resp, err)
	}
}
